<?php
$title = '失物招领发布';
include 'commonHeader.php';
?>


<body>
<?php
// 连主库
$link = mysql_connect(SAE_MYSQL_HOST_M . ':' . SAE_MYSQL_PORT, SAE_MYSQL_USER, SAE_MYSQL_PASS);

// 连从库
// $link=mysql_connect(SAE_MYSQL_HOST_S.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS);
mysql_select_db(SAE_MYSQL_DB, $link);
mysql_query("set names utf8");
$result = mysql_query("SELECT * FROM lostandfound ORDER BY no DESC");

/*echo "<table border='1'>
<tr>
<th>种类</th>
<th>地点</th>
<th>日期</th>
<th>详情</th>

</tr>";

while($row = mysql_fetch_array($result))
	{
		if($row['lorf']==f)
		{
	echo "<tr>";
	echo "<td>" . $row['kind']) . "</td>";
	echo "<td>" . $row['position']) . "</td>";
	echo "<td>" . $row['date']) . "</td>";
	echo "<td>" . $row['remark']) . "</td>";
	echo "</tr>";
		}
	}
echo "</table>";

echo "";*/
while ($row = mysql_fetch_array($result)) {
	if ($row['lorf']==f) {
		echo "
    <div class=\"a\">
      <div class=\"b\">
        <a href=\"" . ($row['pic'] ? (strstr($row['pic'], 'whdxxshxcb-picture.stor.sinaapp.com') ? '' : 'http://whdxxshxcb-picture.stor.sinaapp.com/lostandfound/') . htmlspecialchars($row['pic']) : '') . "\">
          <img src=\"" . ($row['pic'] ? (strstr($row['pic'], 'whdxxshxcb-picture.stor.sinaapp.com') ? '' : 'http://whdxxshxcb-picture.stor.sinaapp.com/lostandfound/') . htmlspecialchars($row['pic']) : 'static/img/noimage.jpg') . "\"  width=\"85\" height=\"100\">
        </a>
      </div>
      <div class=\"c\">" . htmlspecialchars($row['kind']) . "</div>
      <div class=\"c\">" . htmlspecialchars($row['date']) . "</div>
      <div class=\"c\">" . htmlspecialchars($row['position']) . "</div>
      <div class=\"c d rr\">
        <a href=\"remark.php?no=" . $row['no']. "\">详情</a>
      </div>
    </div>";
/*echo "<div class='no'>";
echo "<form action='remark.php' method='get'>"

echo "     <input type='text' name='date' value='".$row['no']."'/></div>";*/
	}
}
mysql_close($link);
?>
</body>
</html>
